time complexity using exact running time